import request from '@/utils/request'

// 查询msfx—终端销售首单列表
export function listMsfxTerminalSalesFirstOrder(query) {
  return request({
    url: '/hbs/msfxTerminalSalesFirstOrder/list',
    method: 'get',
    params: query
  })
}

// 查询msfx—终端销售首单详细
export function getMsfxTerminalSalesFirstOrder(id) {
  return request({
    url: '/hbs/msfxTerminalSalesFirstOrder/' + id,
    method: 'get'
  })
}

// 新增msfx—终端销售首单
export function addMsfxTerminalSalesFirstOrder(data) {
  return request({
    url: '/hbs/msfxTerminalSalesFirstOrder',
    method: 'post',
    data: data
  })
}

// 修改msfx—终端销售首单
export function updateMsfxTerminalSalesFirstOrder(data) {
  return request({
    url: '/hbs/msfxTerminalSalesFirstOrder',
    method: 'put',
    data: data
  })
}

// 删除msfx—终端销售首单
export function delMsfxTerminalSalesFirstOrder(id) {
  return request({
    url: '/hbs/msfxTerminalSalesFirstOrder/' + id,
    method: 'delete'
  })
}



//msfx- 按终端销售首单同步hby报表数据
export function synMsfxTerminalSalesFirstOrderHby() {
  return request({
    url: '/hbs/hbsBusiness/sync/syncDataToHby',
    method: 'put',
    data: {
      space_id: "4000000005826312",
      tableConfigName: "终端销售首单表"
    }
  })
}
